import {post, get} from '@/utils/request'

const listTopic = () => get('/topic/list')
const pageTopic = (params) => get(`/topic/page/${params.pageNum}/${params.pageSize}`)
const createTopic = params =>post('/topic/create', params)
const updateTopic = params =>post('/topic/update', params)
const deleteTopic = (params) =>get(`/topic/delete/${params.id}`)

export {
  listTopic,
  pageTopic,
  createTopic,
  updateTopic,
  deleteTopic
}
